﻿using AutoMapper;
using Interview.API.Admin.Entities.Rbac;
using Interview.API.Admin.RbacDto;

namespace Interview.API.Admin;

public class AdminApplicationAutoMapperProfile : Profile
{
    public AdminApplicationAutoMapperProfile()
    {
        /* You can configure your AutoMapper mapping configuration here.
         * Alternatively, you can split your mapping configurations
         * into multiple profile classes for a better organization. */

        #region RBAC

        //按钮
        CreateMap<SysButtonModel, SysButtonOutputDto>();
        CreateMap<SysButtonInputDto, SysButtonModel>();

        //用户模型映射
        CreateMap<SysUserModel, SysUserOutputDto>();
        CreateMap<SysUserInputDto, SysUserModel>();

        //角色
        CreateMap<SysRoleModel,SysRoleOutputDto>();
        CreateMap<SysRoleInputDto, SysRoleModel>();

        //菜单
        CreateMap<SysMenuInputDto, SysMenuOutputDto>();
        CreateMap<SysMenuInputDto, SysMenuModel>();


        #endregion
    }
}
